﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CAOrderInvoice.aspx.cs"
    Inherits="RN.ERP.Web.CA.CAOrderInvoice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <%=PageTitle %></title>
    <link href="../Styles/style.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/style_msg.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Scripts/iepngfix_tilebg.js"></script>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <link rel="Stylesheet" type="text/css" href="../Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <script type="text/javascript" src="../Scripts/ligerUI/js/ligerui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".return_a").click(function () {
                parent.window.CloseWin("0");
                window.parent.$.ligerDialog.close(); ////关闭dialog
                parent.$(".l-dialog,.l-window-mask").hide(); ////去除父窗体遮罩层
            });
            //            $("#ddlOptType").change(function () {
            //                if ($(this).val() == "1") {
            //                    $("#ddlType option[value='0']").remove();

            //                    $("#tr1").addClass("displayCss");
            //                    $("#tr2").addClass("displayCss");
            //                    $("#tr3").addClass("displayCss");
            //                }
            //                else {
            //                    //$("#ddlType").append("<option value='0'>增值税专用发票</option>");
            //                    if ($("#ddlType").val() == "0") {
            //                        $("#tr1").removeClass("displayCss");
            //                        $("#tr2").removeClass("displayCss");
            //                        $("#tr3").removeClass("displayCss");
            //                    }
            //                }
            //            });
            //            $("#ddlType").change(function () {
            //                if ($(this).val() == "1") {
            //                    $("#tr1").addClass("displayCss");
            //                    $("#tr2").addClass("displayCss");
            //                    $("#tr3").addClass("displayCss");
            //                }
            //                else {
            //                    $("#tr1").removeClass("displayCss");
            //                    $("#tr2").removeClass("displayCss");
            //                    $("#tr3").removeClass("displayCss");
            //                }
            //            })
        })
        function CloseWin() {
            parent.window.CloseWin("1");
            window.parent.$.ligerDialog.close(); ////关闭dialog
            parent.$(".l-dialog,.l-window-mask").hide(); ////去除父窗体遮罩层
        }
        function CheckInfo() {
            if ($("#hidRole").val() == "User") {
                if ($("#txtTaxCode").val() == "" || $("#txtBankName").val() == "" || $("#txtBankCode").val() == "" || $("#txtTitle").val() == "" ||
            $("#txtLinkMan").val() == "" || $("#txtTel").val() == "" || $("#txtMobile").val() == "" || $("#txtPostCode").val() == ""
            || $("#txtAddress").val() == "") {
                    $.ligerDialog.warn("请完善发票信息！");
                    return false;
                }
            }
            else {
                if ($("#txtTitle").val() == "" ||
            $("#txtLinkMan").val() == "" || $("#txtTel").val() == "" || $("#txtMobile").val() == "" || $("#txtPostCode").val() == ""
            || $("#txtAddress").val() == "") {
                    $.ligerDialog.warn("请完善发票信息！");
                    return false;
                }
            }
            return true;
        }
    </script>
    <style type="text/css">
        .IE6png
        {
            behavior: url("../Scripts/iepngfix.htc");
        }
        .text_css
        {
            border: 2px;
            height: 24px;
            line-height: 24px;
        }
        .displayCss
        {
            display: none;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hdnOrderIds" runat="server" />
    <asp:HiddenField ID="hidRole" runat="server" ClientIDMode="Static" />
    <div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td width="16" class="title_lbg IE6png">
                </td>
                <td width="24" class="title_t IE6png">
                </td>
                <td width="900" class="title_libg IE6png">
                    索要发票
                </td>
                <td width="17" class="title_rbg IE6png">
                </td>
            </tr>
            <tr id="tbCorp" runat="server">
                <td class="border_lbg IE6png">
                    &nbsp;
                </td>
                <td colspan="2" style="padding-top: 16px; padding-left: 6px; padding-right: 6px;">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab" style="margin-bottom: 15px;">
                        <tr>
                            <td width="15%" bgcolor="#f2f2f2">
                                <strong>开具类型</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:DropDownList ID="ddlOptType" runat="server" Width="70px">
                                    <asp:ListItem Value="0">企业</asp:ListItem>
                                    <asp:ListItem Value="1">个人</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td width="15%" bgcolor="#f2f2f2">
                                <strong>发票类型</strong>
                            </td>
                            <td style="text-align: left" height="31">
                                <asp:DropDownList ID="ddlType" runat="server">
                                    <asp:ListItem Value="1">增值税普通发票</asp:ListItem>
                                    <asp:ListItem Value="0">增值税专用发票</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr id="tr1" runat="server">
                            <td bgcolor="#f2f2f2">
                                <strong>纳税人识别号</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtTaxCode" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtTaxCode"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtTaxCode"
                                    ErrorMessage="应为15位字符!" ValidationGroup="aa" ValidationExpression="^[a-zA-Z0-9]{15}$"
                                    ForeColor="Red"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr id="tr2" runat="server">
                            <td bgcolor="#f2f2f2">
                                <strong>开户银行名</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtBankName" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtBankName"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr id="tr3" runat="server">
                            <td bgcolor="#f2f2f2">
                                <strong>开户账号</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtBankCode" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtBankCode"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>发票抬头</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtTitle" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="txtTitle"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>联系人</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:TextBox ID="txtLinkMan" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtLinkMan"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                            <td bgcolor="#f2f2f2">
                                <strong>联系电话</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:TextBox ID="txtTel" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtTel"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtTel"
                                    ErrorMessage="*" ValidationGroup="aa" ValidationExpression="^[0-9]*$" ForeColor="Red"></asp:RegularExpressionValidator>--%>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>移动电话</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:TextBox ID="txtMobile" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtMobile"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtMobile"
                                    ErrorMessage="*" ValidationGroup="aa" ValidationExpression="^(13[0-9]|15[0-9]|18[0-9])[0-9]{8}$"
                                    ForeColor="Red"></asp:RegularExpressionValidator>--%>
                            </td>
                            <td bgcolor="#f2f2f2">
                                <strong>邮编</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:TextBox ID="txtPostCode" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtPostCode"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPostCode"
                                    ErrorMessage="*" ValidationGroup="aa" ValidationExpression="^[0-9]*$" ForeColor="Red"></asp:RegularExpressionValidator>--%>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>寄送方式</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:DropDownList ID="ddlSendType" runat="server" Width="100px">
                                    <asp:ListItem Value="1">EMS（免费）</asp:ListItem>
                                    <asp:ListItem Value="2">顺丰（到付）</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td bgcolor="#f2f2f2">
                                <strong>发票内容</strong>
                            </td>
                            <td style="text-align: left">
                                <asp:DropDownList ID="ddlInvoiceTitle" runat="server">
                                    <asp:ListItem Value="软件服务费">软件服务费</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>企业地址</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:Label ID="lbAddress" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>发票寄送地址</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtAddress" runat="server" Width="85%" CssClass="text_css"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtAddress"
                                    ErrorMessage="*" Display="Dynamic" ValidationGroup="aa" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <strong>备注</strong>
                            </td>
                            <td style="text-align: left" colspan="3">
                                <asp:TextBox ID="txtNotice" runat="server" Width="85%" CssClass="text_css" MaxLength="100"></asp:TextBox><span
                                    style="color: Red; padding-left: 2px;">(限100字)</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" style="font-weight: bold; height: 50px; font-size: 20px;">
                                订单总金额：<asp:Label ID="lbSum" runat="server"></asp:Label>元
                            </td>
                        </tr>
                    </table>
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: 15px;">
                        <tr>
                            <td width="422">
                                &nbsp;
                            </td>
                            <td width="189">
                                <div class="icon01 IE6png">
                                    <asp:LinkButton ID="lbtnConfirm" runat="server" OnClientClick="return CheckInfo();"
                                        OnClick="lbtnConfirm_Click">索要发票</asp:LinkButton>
                                </div>
                            </td>
                            <td width="189">
                                <div class="icon02 IE6png">
                                    <a href="javascript:void(0);" class="return_a">返回</a></div>
                            </td>
                            <td width="423">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                    <strong style="color: #FF0000">请核实索要发票的订单信息： </strong>
                    <br />
                    <telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="True" AllowSorting="false"
                        CssClass="tab" AllowFilteringByColumn="false" CellSpacing="0" Culture="zh-CN"
                        AllowPaging="false" AllowCustomPaging="false" AllowMultiRowSelection="true" Width="100%"
                        PageSize="50">
                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="ID" NoMasterRecordsText="暂无数据"
                            InsertItemPageIndexAction="ShowItemOnCurrentPage" AllowNaturalSort="False" AllowSorting="false"
                            CommandItemDisplay="Top">
                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="true">
                            </RowIndicatorColumn>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <PagerStyle AlwaysVisible="True" />
                            <CommandItemTemplate>
                            </CommandItemTemplate>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="iTitle" HeaderText="发票抬头" UniqueName="iTitle"
                                    HeaderStyle-Width="18%" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="LinkPerson" HeaderText="联系人" UniqueName="LinkPerson"
                                    HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="officeTel" HeaderText="联系电话" UniqueName="officeTel"
                                    HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SendAddress" HeaderText="寄送地址" UniqueName="SendAddress"
                                    HeaderStyle-Width="22%" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="GroupName" HeaderText="订单类型" UniqueName="GroupName"
                                    HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SumPay" HeaderText="金额<br/>(单位：元)" UniqueName="SumPay"
                                    HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="True"></Selecting>
                        </ClientSettings>
                        <PagerStyle AlwaysVisible="True" />
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                </td>
                <td class="border_rbg IE6png">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="border_lconer IE6png" headers="17">
                    &nbsp;
                </td>
                <td colspan="2" class="border_bottomli IE6png" height="17">
                    &nbsp;
                </td>
                <td class="border_rconer IE6png" headers="17">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <asp:HiddenField ID="hidGuid" runat="server" />
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>
    </form>
</body>
</html>
